<script type="text/javascript">
    $(document).ready(function(){
        $("#horri_menu ul li:last,#district_infos").addClass("active");
    });
</script>
<h1>ตำบลต้นแบบ</h1>
<?php include "_menu.php";?>

<!-- Load TinyMCE -->
<script type="text/javascript" src="media/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="media/tiny_mce/config.js"></script>
<script type="text/javascript" src="media/js/jquery.validate.min.js"></script>
<script type="text/javascript">
tiny('detail');
$(function(){
    $("#horri_menu ul li:last").addClass("active");
    
    $("#frmMain").validate({
        rules: 
        {
            "title": 
            { 
                required: true
            }
        },
        messages:
        {
            "title": 
            { 
                required: "กรุณากรอกหัวข้อค่ะ"
            }
        }
    });     
})
</script>
<br>
<form id="frmMain" action="district_infos/admin/districts/save/<?php echo $district->id ?>" method="post" enctype="multipart/form-data" >
<table class="form">
    <tr>
        <th>หัวข้อ :</th>
        <td>
            <input type="text" name="title" rel="th" value="<?php echo $district->title?>" class="full" />
        </td>
    </tr>
     <tr>
        <th>รายละเอียด :</th>
        <td>
            <textarea name="detail"><?php echo $district->detail?></textarea>
        </td>
    </tr>
    <tr>
		<th>ไฟล์แนบ :</th>
		<td><input type="text" name="file" value="<?php echo $district->file?>"/><input type="button" name="browse" value="เลือกไฟล์" onclick="browser($(this).prev(),'province')" /></td>
	</tr>
    <tr><th></th>
    	<td>
    		<?php if(permission('district_infos', 'update')):?>
    		<input type="submit" value="บันทึก" /><input type="button" name="back" value="ย้อนกลับ" onclick="window.location = 'district_infos/admin/districts'" />
    		<?php endif;?>
    	</td>
    </tr>
</table>
</form>